package com.fc.v2.model.auto;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import cn.hutool.core.util.StrUtil;

/**
 * 文件上传映射表 FinishUploadExample
 * @author Archie_自动生成
 * @date 2021-12-15 13:40:42
 */
public class FinishUploadExample {

    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public FinishUploadExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }
        
				
        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(String value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(String value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(String value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(String value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(String value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(String value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLike(String value) {
            addCriterion("id like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotLike(String value) {
            addCriterion("id not like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<String> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<String> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(String value1, String value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(String value1, String value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }
        
				
        public Criteria andSumUrlIsNull() {
            addCriterion("sum_url is null");
            return (Criteria) this;
        }

        public Criteria andSumUrlIsNotNull() {
            addCriterion("sum_url is not null");
            return (Criteria) this;
        }

        public Criteria andSumUrlEqualTo(String value) {
            addCriterion("sum_url =", value, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlNotEqualTo(String value) {
            addCriterion("sum_url <>", value, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlGreaterThan(String value) {
            addCriterion("sum_url >", value, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlGreaterThanOrEqualTo(String value) {
            addCriterion("sum_url >=", value, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlLessThan(String value) {
            addCriterion("sum_url <", value, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlLessThanOrEqualTo(String value) {
            addCriterion("sum_url <=", value, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlLike(String value) {
            addCriterion("sum_url like", value, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlNotLike(String value) {
            addCriterion("sum_url not like", value, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlIn(List<String> values) {
            addCriterion("sum_url in", values, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlNotIn(List<String> values) {
            addCriterion("sum_url not in", values, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlBetween(String value1, String value2) {
            addCriterion("sum_url between", value1, value2, "sumUrl");
            return (Criteria) this;
        }

        public Criteria andSumUrlNotBetween(String value1, String value2) {
            addCriterion("sum_url not between", value1, value2, "sumUrl");
            return (Criteria) this;
        }
        
				
        public Criteria andResUrlIsNull() {
            addCriterion("res_url is null");
            return (Criteria) this;
        }

        public Criteria andResUrlIsNotNull() {
            addCriterion("res_url is not null");
            return (Criteria) this;
        }

        public Criteria andResUrlEqualTo(String value) {
            addCriterion("res_url =", value, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlNotEqualTo(String value) {
            addCriterion("res_url <>", value, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlGreaterThan(String value) {
            addCriterion("res_url >", value, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlGreaterThanOrEqualTo(String value) {
            addCriterion("res_url >=", value, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlLessThan(String value) {
            addCriterion("res_url <", value, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlLessThanOrEqualTo(String value) {
            addCriterion("res_url <=", value, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlLike(String value) {
            addCriterion("res_url like", value, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlNotLike(String value) {
            addCriterion("res_url not like", value, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlIn(List<String> values) {
            addCriterion("res_url in", values, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlNotIn(List<String> values) {
            addCriterion("res_url not in", values, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlBetween(String value1, String value2) {
            addCriterion("res_url between", value1, value2, "resUrl");
            return (Criteria) this;
        }

        public Criteria andResUrlNotBetween(String value1, String value2) {
            addCriterion("res_url not between", value1, value2, "resUrl");
            return (Criteria) this;
        }
        
				
        public Criteria andDupUrlIsNull() {
            addCriterion("dup_url is null");
            return (Criteria) this;
        }

        public Criteria andDupUrlIsNotNull() {
            addCriterion("dup_url is not null");
            return (Criteria) this;
        }

        public Criteria andDupUrlEqualTo(String value) {
            addCriterion("dup_url =", value, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlNotEqualTo(String value) {
            addCriterion("dup_url <>", value, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlGreaterThan(String value) {
            addCriterion("dup_url >", value, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlGreaterThanOrEqualTo(String value) {
            addCriterion("dup_url >=", value, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlLessThan(String value) {
            addCriterion("dup_url <", value, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlLessThanOrEqualTo(String value) {
            addCriterion("dup_url <=", value, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlLike(String value) {
            addCriterion("dup_url like", value, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlNotLike(String value) {
            addCriterion("dup_url not like", value, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlIn(List<String> values) {
            addCriterion("dup_url in", values, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlNotIn(List<String> values) {
            addCriterion("dup_url not in", values, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlBetween(String value1, String value2) {
            addCriterion("dup_url between", value1, value2, "dupUrl");
            return (Criteria) this;
        }

        public Criteria andDupUrlNotBetween(String value1, String value2) {
            addCriterion("dup_url not between", value1, value2, "dupUrl");
            return (Criteria) this;
        }
        
				
        public Criteria andFinishIdIsNull() {
            addCriterion("finish_id is null");
            return (Criteria) this;
        }

        public Criteria andFinishIdIsNotNull() {
            addCriterion("finish_id is not null");
            return (Criteria) this;
        }

        public Criteria andFinishIdEqualTo(String value) {
            addCriterion("finish_id =", value, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdNotEqualTo(String value) {
            addCriterion("finish_id <>", value, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdGreaterThan(String value) {
            addCriterion("finish_id >", value, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdGreaterThanOrEqualTo(String value) {
            addCriterion("finish_id >=", value, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdLessThan(String value) {
            addCriterion("finish_id <", value, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdLessThanOrEqualTo(String value) {
            addCriterion("finish_id <=", value, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdLike(String value) {
            addCriterion("finish_id like", value, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdNotLike(String value) {
            addCriterion("finish_id not like", value, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdIn(List<String> values) {
            addCriterion("finish_id in", values, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdNotIn(List<String> values) {
            addCriterion("finish_id not in", values, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdBetween(String value1, String value2) {
            addCriterion("finish_id between", value1, value2, "finishId");
            return (Criteria) this;
        }

        public Criteria andFinishIdNotBetween(String value1, String value2) {
            addCriterion("finish_id not between", value1, value2, "finishId");
            return (Criteria) this;
        }
        
				
        public Criteria andFreeCheckUrlIsNull() {
            addCriterion("free_check_url is null");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlIsNotNull() {
            addCriterion("free_check_url is not null");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlEqualTo(String value) {
            addCriterion("free_check_url =", value, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlNotEqualTo(String value) {
            addCriterion("free_check_url <>", value, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlGreaterThan(String value) {
            addCriterion("free_check_url >", value, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlGreaterThanOrEqualTo(String value) {
            addCriterion("free_check_url >=", value, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlLessThan(String value) {
            addCriterion("free_check_url <", value, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlLessThanOrEqualTo(String value) {
            addCriterion("free_check_url <=", value, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlLike(String value) {
            addCriterion("free_check_url like", value, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlNotLike(String value) {
            addCriterion("free_check_url not like", value, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlIn(List<String> values) {
            addCriterion("free_check_url in", values, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlNotIn(List<String> values) {
            addCriterion("free_check_url not in", values, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlBetween(String value1, String value2) {
            addCriterion("free_check_url between", value1, value2, "freeCheckUrl");
            return (Criteria) this;
        }

        public Criteria andFreeCheckUrlNotBetween(String value1, String value2) {
            addCriterion("free_check_url not between", value1, value2, "freeCheckUrl");
            return (Criteria) this;
        }
        
				
        public Criteria andProveUrlIsNull() {
            addCriterion("prove_url is null");
            return (Criteria) this;
        }

        public Criteria andProveUrlIsNotNull() {
            addCriterion("prove_url is not null");
            return (Criteria) this;
        }

        public Criteria andProveUrlEqualTo(String value) {
            addCriterion("prove_url =", value, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlNotEqualTo(String value) {
            addCriterion("prove_url <>", value, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlGreaterThan(String value) {
            addCriterion("prove_url >", value, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlGreaterThanOrEqualTo(String value) {
            addCriterion("prove_url >=", value, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlLessThan(String value) {
            addCriterion("prove_url <", value, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlLessThanOrEqualTo(String value) {
            addCriterion("prove_url <=", value, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlLike(String value) {
            addCriterion("prove_url like", value, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlNotLike(String value) {
            addCriterion("prove_url not like", value, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlIn(List<String> values) {
            addCriterion("prove_url in", values, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlNotIn(List<String> values) {
            addCriterion("prove_url not in", values, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlBetween(String value1, String value2) {
            addCriterion("prove_url between", value1, value2, "proveUrl");
            return (Criteria) this;
        }

        public Criteria andProveUrlNotBetween(String value1, String value2) {
            addCriterion("prove_url not between", value1, value2, "proveUrl");
            return (Criteria) this;
        }
        
			
		 public Criteria andLikeQuery(FinishUpload record) {
		 	List<String> list= new ArrayList<String>();
		 	List<String> list2= new ArrayList<String>();
        	StringBuffer buffer=new StringBuffer();
			if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) {
    			 list.add("ifnull(id,'')");
    		}
			if(record.getSumUrl()!=null&&StrUtil.isNotEmpty(record.getSumUrl().toString())) {
    			 list.add("ifnull(sum_url,'')");
    		}
			if(record.getResUrl()!=null&&StrUtil.isNotEmpty(record.getResUrl().toString())) {
    			 list.add("ifnull(res_url,'')");
    		}
			if(record.getDupUrl()!=null&&StrUtil.isNotEmpty(record.getDupUrl().toString())) {
    			 list.add("ifnull(dup_url,'')");
    		}
			if(record.getFinishId()!=null&&StrUtil.isNotEmpty(record.getFinishId().toString())) {
    			 list.add("ifnull(finish_id,'')");
    		}
			if(record.getFreeCheckUrl()!=null&&StrUtil.isNotEmpty(record.getFreeCheckUrl().toString())) {
    			 list.add("ifnull(free_check_url,'')");
    		}
			if(record.getProveUrl()!=null&&StrUtil.isNotEmpty(record.getProveUrl().toString())) {
    			 list.add("ifnull(prove_url,'')");
    		}
			if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) {
    			list2.add("'%"+record.getId()+"%'");
    		}
			if(record.getSumUrl()!=null&&StrUtil.isNotEmpty(record.getSumUrl().toString())) {
    			list2.add("'%"+record.getSumUrl()+"%'");
    		}
			if(record.getResUrl()!=null&&StrUtil.isNotEmpty(record.getResUrl().toString())) {
    			list2.add("'%"+record.getResUrl()+"%'");
    		}
			if(record.getDupUrl()!=null&&StrUtil.isNotEmpty(record.getDupUrl().toString())) {
    			list2.add("'%"+record.getDupUrl()+"%'");
    		}
			if(record.getFinishId()!=null&&StrUtil.isNotEmpty(record.getFinishId().toString())) {
    			list2.add("'%"+record.getFinishId()+"%'");
    		}
			if(record.getFreeCheckUrl()!=null&&StrUtil.isNotEmpty(record.getFreeCheckUrl().toString())) {
    			list2.add("'%"+record.getFreeCheckUrl()+"%'");
    		}
			if(record.getProveUrl()!=null&&StrUtil.isNotEmpty(record.getProveUrl().toString())) {
    			list2.add("'%"+record.getProveUrl()+"%'");
    		}
        	buffer.append(" CONCAT(");
	        buffer.append(StrUtil.join(",",list));
        	buffer.append(")");
        	buffer.append(" like CONCAT(");
        	buffer.append(StrUtil.join(",",list2));
        	buffer.append(")");
        	if(!" CONCAT() like CONCAT()".equals(buffer.toString())) {
        		addCriterion(buffer.toString());
        	}
        	return (Criteria) this;
        }
        
        public Criteria andLikeQuery2(String searchText) {
		 	List<String> list= new ArrayList<String>();
        	StringBuffer buffer=new StringBuffer();
    		list.add("ifnull(id,'')");
    		list.add("ifnull(sum_url,'')");
    		list.add("ifnull(res_url,'')");
    		list.add("ifnull(dup_url,'')");
    		list.add("ifnull(finish_id,'')");
    		list.add("ifnull(free_check_url,'')");
    		list.add("ifnull(prove_url,'')");
        	buffer.append(" CONCAT(");
	        buffer.append(StrUtil.join(",",list));
        	buffer.append(")");
        	buffer.append("like '%");
        	buffer.append(searchText);
        	buffer.append("%'");
        	addCriterion(buffer.toString());
        	return (Criteria) this;
        }
        
}
	
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}